# headstock.py

r'''This just turns, no rocking or pumping!
'''

from __future__ import division

from ot_simulator.component import component

class headstock(component.component):
    '''This can rotate or be set to a fixed index (degrees).

    ===============  ==========================
     Input setting   
    ===============  ==========================
    index            degrees
    ===============  ==========================

    ===============  ==========================
    Output setting
    ===============  ==========================
    <none>
    ===============  ==========================
    '''
    input_parameters = ('index',)

    def get_transform(self, params, transform_in):
        return transform_in.rotate_z(self.get_param(params, 'index'))


def test():
    import doctest
    import sys
    sys.exit(doctest.testmod()[0])

if __name__ == "__main__":
    test()
